<table class="ui celled table">
    <thead>
        <tr>
            <th width="45px" ng-if="mainCtr.showCheckbox">
                <div class="ui checkbox">
                    <input type="checkbox" name="example" ng-model="mainCtr.isCheckedAll"
                        ng-click="mainCtr.checkedAll()">
                    <label></label>
                </div>
            </th>
            <th ng-repeat="item in mainCtr.columns" ng-style="{width: item.width||'auto'}">
                <span>{{item.name}}</span>
                <span class="sort-container" ng-if="item.sort">
                    <i class="icon sort {{item.sortClass}}" ng-click="mainCtr.handleSort(item.key,$index)"></i>
        </tr>
    </thead>
    <tbody>
        <tr ng-repeat="item in mainCtr.data">
            <td ng-if="mainCtr.showCheckbox">
                <div class="ui checkbox">
                    <input type="checkbox" name="example" ng-model="item.checked" ng-click="mainCtr.checkedItem()">
                    <label></label>
                </div>
            </td>
            <td ng-repeat="subItem in mainCtr.columns">
                <cell-div ng-if="!subItem.formatter" render="item[subItem.key]"></cell-div>
                <cell-div ng-if="subItem.formatter" render="subItem.formatter(item)"></cell-div>
            </td>
        </tr>
    </tbody>
</table>